import React, {Component} from 'react'
import {Button, List} from 'antd-mobile';
import {Link,withRouter} from "react-router-dom";
import style from './AntdTest.module.less'
class AntdTest extends Component {
  constructor(props) {
    super(props)
    this.state = {
      val: ''
    }

  }

  changeInput(e) {
    this.setState({
      val: e.target.value
    })
  }
  toPage(){
    this.props.history.replace('/axios-test')
  }
  render() {
    return (
      <div>
        <div className={style.box}></div>
        <List style={{margin: '5px 0', backgroundColor: 'white'}}>
          <List.Item
            extra={<Button type="ghost" size="large" inline>large</Button>}
            multipleLine
          >
            Regional manager
            <List.Item.Brief>
              Can be collected, refund, discount management, view data and other operations
            </List.Item.Brief>
          </List.Item>
          <List.Item
            extra={<Button type="primary" size="large" inline>large</Button>}
            multipleLine
          >
            Regional manager
            <List.Item.Brief>
              Can be collected, refund, discount management, view data and other operations
            </List.Item.Brief>
          </List.Item>
        </List>
        <input type="text" value={this.state.val} onChange={(e) => this.changeInput(e)}/>
        <br/>
        <Link to='/axios-test'>/axios-test</Link>
        <button onClick={()=>this.toPage()}>/axios-test</button>
      </div>
    )
  }
}
export default withRouter(AntdTest);
